package com.wk.springbootlearn.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wk.springbootlearn.pojo.entity.User;
import com.wk.springbootlearn.pojo.form.GetUsersForm;
import com.wk.springbootlearn.pojo.model.UserListItemModel;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;


public interface UserMapper extends BaseMapper<User> {

//    @Select("select * from user where name='${name}'")
//    List<User> getMy(@Param("name") String name);

//    @Select("select * from user ${ew.customSqlSegment}")
//    IPage<User> selectPageUser(Page<?> page, @Param(Constants.WRAPPER) QueryWrapper<User> queryWrapper);

    IPage<UserListItemModel> findUserList(Page<?> page, @Param("getUsersForm") GetUsersForm getUsersForm);
}
